Home About Assignments Final Project

Week 12:

For this assignment i will write a code to visualize the input values received from the sensor "LDR" which i made its ciruit in "Input Devices" assignment before.
i decided to write the code in Processing, firstly when i googled "Arduino and Processing" i found a way which is using a library called firmata but after that i figured out it won't work with attiny and i need to find another way.
I found some tutorials illustrating how to connect processing with Aruino using serial communication.
you need to write an arduino code which reads the input values and writes it in serial monintor then you use these inputs in processing code to visualize them.

i didn'n know which serial port arduino uses, but found that code which will help you as well
"import processing.serial.*;
import cc.arduino.*;
println(Arduino.list());
"
you might need to chane the COM port in device manager or you could update the array index in code.
I found and tried some examples and some codes to get one to work and undesrstand how it works.




Video
DOWNLOAD FILES